package com.wn.base;

import java.util.ArrayList;
import java.util.List;

/**
 * @FileName: Demo2
 * @Description: TODO
 * @Author: MaWenHao
 * @Created: 2020/11/18 - 10:39 下午
 */
public class Demo2 {

    public static List<String> getNewDays(List<String> datelist) {
        int perCount = 10, index = 0;
        int times = datelist.size() / perCount;
        List<String> newDateList = new ArrayList<>();
        for (int i = 0; i < datelist.size(); i += times) {
            newDateList.add(datelist.get(i));
        }
        newDateList.set(newDateList.size() - 1, datelist.get(datelist.size() - 1));
        return newDateList;
    }

    // public static void main(String[] args) {
    //     Map<String, Object> parameter = new HashMap<>(8);
    //     parameter.put("validReqid", null);
    //     // String valid_reqid = String.valueOf(parameter.get("validReqid"));
    //     String valid_reqid = (String) parameter.get("validReqid");
    //     if (valid_reqid == null || "".equals(valid_reqid)) {
    //         System.out.println("================");
    //     }
    //
    //     new BigDecimal((String) parameter.get("validReqid"));
    // }

    public static void main(String[] args) {
        String str = "warn_quotas_process";
        String s = str.split("-")[0];
        String s1 = str.split("-").length > 1 ? str.split("-")[1] : null;
        System.out.println(s);
        System.out.println(s1);
    }
}
